////////////////////////////////////////////////////////////////////////////////
// Filename: billboard.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _BILLBOARD_H_
#define _BILLBOARD_H_

#include <windows.h>
#include <xnamath.h>
#include "CDirect3D.h"

class BasicEffect;
class Texture;

struct VertexTypeBillboard
{
	XMFLOAT3 position;
	XMFLOAT2 size;
	float alpha;
	XMFLOAT2 texturePosition;
	XMFLOAT2 textureSize;
};

class Billboard
{
public:
	Billboard();
	Billboard(const Billboard&);
	Billboard operator=(Billboard const&);
	~Billboard();

	bool Initialize(int pCount, Texture* pTexture, BasicEffect* pShader);
	void Dispose();

	void Render();
	void Billboard::UpdateBillboard(VertexTypeBillboard* pSpritesData, int pSpritesCount);
private:
	ID3D11DeviceContext * mDeviceContext;

	BasicEffect* mShader;
	ID3D11Buffer *mVertexBuffer;
	XMFLOAT3 mPosition;
	XMFLOAT2 mSize;
	Texture* mTexture;
	int mSpritesCount;
};

#endif